﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Collections;

namespace ITunesSolver.Helpers
{
    public class Song : IEqualityComparer
    {
        // Tag (in iTunes XML):
        public int Index { get; set; }
        public int TrackId { get; set; }		// TrackID
        public string Album { get; set; }		// Name
        public string Artist { get; set; }		// Album
        public int BitRate { get; set; }		// BitRate
        public string Comments { get; set; }	// Comments
        public string Composer { get; set; }	// Composer
        public string Genre { get; set; }		// Genre
        public string Kind { get; set; }		// Kind
        public string Location { get; set; }	// Location
        public string Name { get; set; }		// Name
        public int PlayCount { get; set; }		// PlayCount
        public int SampleRate { get; set; }		// SampleRate
        public Int64 Size { get; set; }			// Size
        public Int64 TotalTime { get; set; }	// TotalTime
        public int TrackNumber { get; set; }	// TrackNumber

        public string CleanedLocation { get; set; }
        public string CleanedName { get; set; }
        public string CleanedArtist { get; set; }
        public string CleanedAlbum { get; set; }
        public string AlbumArtist { get; set; }
        public DateTime DateModified { get; set; }
        public DateTime DateAdded { get; set; }
        public Int64 PlayDate { get; set; }
        public DateTime PlayDate_UTC { get; set; }
        public int Rating { get; set; }
        public int AlbumRating { get; set; }
        public bool? AlbumRatingComputed { get; set; }
        public string PersistentID { get; set; }
        public string TrackType { get; set; }
        public int FileFolderCount { get; set; }
        public int LibraryFolderCount { get; set; }

        public int DiscCount { get; set; }
        public int DiscNumber { get; set; }
        public int TrackCount { get; set; }
        public int Year { get; set; }

        public DateTime RelaseDate { get; set; }

        public string debug { get; set; }

        public int ArtworkCount { get; set; }

        public bool? Protected { get; set; }

        public bool? Purchased { get; set; }

        public string SortAlbumArtist { get; set; }

        public string SortArtist { get; set; }

        public bool? Compilation { get; set; }

        public string SortName { get; set; }

        public string SortAlbum { get; set; }

        public string SortComposer { get; set; }

        #region IEqualityComparer Members

        public bool Equals(object x, object y)
        {
            return ((Song)x).Index == ((Song)y).Index;
        }

        public int GetHashCode(object obj)
        {
            return ((Song)obj).Index;
        }

        #endregion
    }
}


